home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / modelers / geomview / source.lha / Geomview / include / window.h < prev    next >
C/C++ Source or Header  |  1993-04-01  |  3KB  |  87 lines

  1. /* Copyright (c) 1992 The Geometry Center; University of Minnesota
  2.    1300 South Second Street;  Minneapolis, MN  55454, USA;
  3.    
  4. This file is part of geomview/OOGL. geomview/OOGL is free software;
  5. you can redistribute it and/or modify it only under the terms given in
  6. the file COPYING, which you should have received along with this file.
  7. This and other related software may be obtained via anonymous ftp from
  8. geom.umn.edu; email: software@geom.umn.edu. */
  9.  
  10. /* Authors: Charlie Gunn, Stuart Levy, Tamara Munzner, Mark Phillips */
  11.  
  12. #ifndef WINDOWDEF
  13. #define WINDOWDEF
  14.  
  15. #include <stdio.h>
  16. #include "reference.h"
  17.  
  18. #include "ooglutil.h"
  19. #include "streampool.h"
  20.  
  21. typedef struct {
  22.     int xmin, xmax, ymin, ymax;
  23. } WnPosition;
  24.  
  25. typedef struct WnWindow WnWindow;
  26.  
  27. /* Public WnWindow methods: */
  28.  
  29. extern WnWindow *WnCreate(int firstattr, ... /*, WN_END */);
  30. extern WnWindow *WnSet(WnWindow *, int firstattr, ... /*, WN_END */);
  31. extern int     WnGet(WnWindow *, int attr, void *value);
  32. extern void     WnDelete(WnWindow *);
  33. extern WnWindow *WnCopy(WnWindow *);
  34. extern WnWindow *WnMerge(WnWindow *src, WnWindow *dst);
  35.  
  36. extern int WnStreamOut( Pool *, Handle *, WnWindow * );
  37.  
  38. /*
  39.  * Attributes for WnCreate(), WnSet(), WnGet().
  40.  *
  41.  * Supplying a NULL pointer, or -1 value, for one of these
  42.  * unsets the corresponding value.
  43.  * 
  44.  * Initially, all values are unset.
  45.  *
  46.  * WnGet()'s returned value
  47.  *    on an invalid token is -1
  48.  *    on an unset value is 0
  49.  *    on a  set value is 1
  50.  */
  51.                 /* Set/Create type    Get type    */
  52. #define    WN_END        900    /* ---------------    --------    */
  53. #define WN_XSIZE    901    /* int            int *        */
  54. #define WN_YSIZE    902    /* int            int *        */
  55. #define WN_PREFPOS    903    /* WnPosition *        WnPosition *    */
  56. #define    WN_VIEWPORT    904    /* WnPosition *        WnPosition *    */
  57. #define    WN_CURPOS    905    /* WnPosition *        WnPosition *    */
  58. #define    WN_NAME        906    /* char *        char **        */
  59. /*
  60.  * The following attributes always have a value (may not be "unset"):
  61.  */
  62. #define WN_ENLARGE    907    /* int            int *        */
  63. #define WN_SHRINK    908    /* int            int *        */
  64. #define WN_NOBORDER    909    /* int            int *        */
  65. #define WN_ASPECT    910    /* --- unsettable ---    float *        */
  66. #define    WN_PIXELASPECT    911    /* float        float *        */
  67.  
  68. #define WN_ABLOCK    912    /* void **ablock    --ungettable--    */
  69. /*
  70.   WN_END:    end of attribute list
  71.   WN_XSIZE:    desired window width in pixels
  72.   WN_YSIZE:    desired window height in pixels
  73.   WN_PREFPOS:    desired absolute position of window (pixels)
  74.   WN_VIEWPORT:    viewport relative to window (pixels)
  75.   WN_CURPOS:    window's real position (pixels)
  76.   WN_NAME:    window name
  77.   WN_ENLARGE:    window enlargable from pref size? (1=yes, 0=no) (default:1)
  78.   WN_SHRINK:    window shrinkable from pref size? (1=yes, 0=no) (default:1)
  79.   WN_NOBORDER:    draw window without border? (1=yes, 0=no)    (default:0)
  80.   WN_ASPECT:    the window's current aspect ratio; the window package updates
  81.           this automatically when you set the CURPOS attribute.
  82.   WN_PIXELASPECT: pixel aspect ratio, i.e. screen X pixel size / Y pixel size.
  83.         Default is 1.0, but may change e.g. for stereo hardware.
  84.         Taken into account by WN_ASPECT */
  85.  
  86. #endif /* WINDOWDEF */
  87.